/*
 * @ author Junr
 * @ use 用户相关API
 */
import Request from '../request';
export default {
  // 登录
  login(params) {
    return Request.post({ url: `/login`, params });
  },
  // 发送短信
  sendMsg(params) {
    return Request.post({ url: `/sms/send/` + params.type, params });
  },
  // 获取用户信息
  getUserInfo(params) {
    return Request.post({ url: `/m/user/info`, params });
  },
  // 注册
  register(params) {
    return Request.post({ url: `/reg`, params });
  },
  // 忘记密码
  forgotPassword(params) {
    return Request.post({ url: `/forget`, params });
  },
  // 修改密码
  updatePass(params) {
    return Request.post({ url: `/m/pass/update`, params });
  },
  // 账户信息
  accountInfo(params) {
    return Request.post({ url: `/m/account/info`, params });
  },
  // 收货地址
  address(params, url) {
    return Request.post({ url: `/m/address/${url}`, params });
  },
  // 银行卡
  bank(params, url) {
    return Request.post({ url: `m/receive/account/${url}`, params });
  },
  // 各分明细、余额明细
  water(params, url) {
    return Request.post({ url: `/m/finance/water`, params });
  },
  // 会员推荐
  invite(params) {
    return Request.post({ url: `/m/invite/index`, params });
  },
  // 会员推荐记录
  record(params) {
    return Request.post({ url: `/m/invite/record`, params });
  },
  // 订单列表(广告订单&积分订单&订单详情)
  order(params, url) {
    return Request.post({ url: `/m/order/${url}`, params });
  },
  // 充值：第一步
  rechargeFirst(params) {
    return Request.post({ url: `/m/recharge/first`, params });
  },
  // 充值：第二步
  rechargeSecond(params) {
    return Request.post({ url: `/m/recharge/second`, params });
  },
  // 充值：第三步
  rechargeApply(params) {
    return Request.post({ url: `/m/recharge/apply`, params });
  },
  // 充值记录
  rechargeRecord(params) {
    return Request.post({ url: `/m/recharge/record`, params });
  },
  // 提现：第一步
  withdrawApplyFirst(params) {
    return Request.post({ url: `/m/withdraw/apply/first`, params });
  },
  // 提现：第二步
  withdrawApplyFinish(params) {
    return Request.post({ url: `/m/withdraw/apply`, params });
  },
  // 提现记录
  withdrawRecord(params) {
    return Request.post({ url: `/m/withdraw/record`, params });
  },
  // 奖励记录
  bonusRecord(params) {
    return Request.post({ url: `/m/bonus/record`, params });
  },
  // 佣金转注册积分
  transfer(params, url) {
    return Request.post({ url: `/m/transfer/commToReg/${url}`, params });
  },
  // 注册积分转账
  regTransfer(params, url) {
    return Request.post({ url: `/m/transfer/${url}`, params });
  },
  // 帐户管理
  account(params, url) {
    return Request.post({ url: `/m/account/${url}`, params });
  },
  // 实名认证保存
  memberCertSave(params) {
    return Request.post({ url: `/m/member/cert/save`, params });
  },
  // 实名认证查询
  memberCertQuery(params) {
    return Request.post({ url: `/m/member/cert/query`, params });
  },
  // 会员升级
  memberUpgradeEdit(params) {
    return Request.post({ url: `/m/member/upgrade/edit`, params });
  },
  // 选择级别
  memberLevelEdit(params) {
    return Request.post({ url: `/m/member/level/edit`, params });
  },
  // 升级
  membershipUpgrade(params) {
    return Request.post({ url: `/m/membership/upgrade`, params });
  },
  // 用户注册
  reg(params, url) {
    return Request.post({ url: `/m/reg`, params });
  },
  // 用户等级
  memberLevel(params, url) {
    return Request.post({ url: `/m/member/level`, params });
  },
  // 我的团队
  myTeam(params, url) {
    return Request.post({ url: `/m/my/team`, params });
  },
  // 激活会员
  activeMember(params, url) {
    return Request.post({ url: `/m/active/member`, params });
  },
  // 报单中心
  sCapplyMessage(params, url) {
    return Request.post({ url: `/m/sc/apply/${url}`, params });
  },
  // 市场团队
  marketTeam(params, url) {
    return Request.post({ url: `/m/market/team`, params });
  },
  // 市场团队
  levelMarketTeam(params, url) {
    return Request.post({ url: `/m/market/level/list`, params });
  },
  // 删除会员
  memDel(params) {
    return Request.post({ url: `/m/mem/del`, params });
  },
  // 绑定剑龙会员
  bindJl(params) {
    return Request.post({ url: `/m/mem/bind/jl`, params });
  },
  // 绑定剑龙会员
  financeWater(params) {
    return Request.post({ url: `/m/finance/water`, params });
  },
  // 省市区定制
  areaSelect(params) {
    return Request.post({ url: `/m/areas/select/${params.lv}/${params.pid}`, params });
  }
};
